﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DAL_Class
{
    public class UIArticle
    {
        NLLDataContext db;
        #region "Lay Bai viet ra trang chu"
        public IEnumerable<Article> GetArticleToHome()
        {
            db = new NLLDataContext();
            IEnumerable<Article> articles = from a in db.Articles
                                      where (a.IsFrontPage == true)
                                      orderby a.CreateDate ascending
                                      select a;
            return articles;
        }
        #endregion
    }
}
